#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>>
int main()
{
	int seconds = 0;
	int h = 0;
	int m = 0;
	int s = 0;
	scanf("%d", &seconds);
	h = seconds / 60 / 60;
	m = seconds / 60 % 60;
	s = seconds % 60;
	printf("%d %d %d\n",h,m,s);
	return 0;
}